<template>
	<view class="">
		<view class="detail" v-if="peoplenum">
			<view class="detail_list" v-for="(item, index) in active_info">
				<view class="detail_list_left">
					<image :src="item.Avatar" mode=""></image>
					<span>{{ item.MemberName }}</span>
				</view>
				<view class="detail_list_right">
					<view v-if="item.res_state == 1" class="pass">审核通过</view>
					<view v-else-if="!item.res_state" class="nopass">未审核</view>
					<view v-else class="nopass">审核不通过</view>
				</view>
			</view>
		</view>
		<view class="nodata" v-else>
			<image src="https://ykp-new.oss-cn-hangzhou.aliyuncs.com/client/index/nodata.png" mode=""></image>
			<view class="nodata_item">暂无数据</view>
		</view>
		<navigation></navigation>
	</view>
</template>

<script>
import navigation from '@/components/navigation/navigation.vue';
export default {
	components: {
		navigation
	},
	data() {
		return {
			pg: 0,
			peoplelist: [{ name: '安徒的谎言真真假假', state: 0 }, { name: '小二郎', state: 1 }, { name: '安徒的谎言', state: 0 }],
			active_id: '',
			active_info: [],
			peoplenum: ''
		};
	},
	onLoad(options) {
		this.active_id = options.active_id;
		//  // console.log (this.pg)
	},
	mounted() {
		this.getInfo();
	},
	methods: {
		getInfo() {
			this.ajax('active/resultList', {
				data: {
					active_id: this.active_id
				},
				success: res => {
					res.msg.data.forEach( item => {
						if(item.Avatar) {
							item.Avatar = item.Avatar.replace("http:","https:")
						}
					})
					 // console.log (res);
					this.peoplenum = res.msg.total;
					 // console.log (this.peoplenum);
					this.active_info = res.msg.data;
				}
			});
		}
	}
};
</script>

<style lang="less" scoped>
@import url('../../static/less/pageA/competiondetail/detail.less');
</style>
